<?php
include_once("./_common.php");

$mb = get_member($mb_id);

$ySales = "y".$myYear;

$sql = "SELECT $ySales
		  FROM month_avg
		 WHERE store_num='$branch'";
$rst = sql_query($sql);

while($row = mysql_fetch_assoc($rst)) {
	$list[] = $row;
}

$result = "";

if (count($list) == 1) {
	if ($list[0][$ySales] != "") {
		$result = $list[0][$ySales]."<col>END"."<row>";
	}
	else {
		$result = "Database Error";
	}
}
else {
	$result = "Database Error";
}

echo($result);
?>